import React from 'react';
import ReactDOM from 'react-dom';
import './assets/common.css';

import {HashRouter as Router, Switch, Route, Link, NavLink, Redirect} from 'react-router-dom';

import Login from './pages/Login';
import Dashboard from './pages/Dashboard'
import Collect from './pages/Collect';


ReactDOM.render(
    <Router>
        <Switch>
            {/*1. 后台的登录*/}
            <Route path='/' exact component={Login}></Route>
            <Route path='/login' exact component={Login}></Route>

            {/*2. 后台的首页*/}
            {/*如果是嵌套路由，嵌套路由的父页面不能加上 exact */}
            <Route path='/dashboard'  component={Dashboard}></Route>
        </Switch>
    </Router>,
    document.getElementById('root')
);

